
export default async function base_64(node: HTMLInputElement) {
	return new Promise((resolve, reject) => {
		const file = node.files[0];
		const reader = new FileReader();
		reader.readAsDataURL(file);
		reader.onload = function (e) {
			const file_str = this.result;
			resolve(file_str);
		}
		reader.onerror = function (e) {
			reject(e);
		}
	})

}